//请求路径常量
import * as req_con from '../utils/constant'
import {adminController} from './controller/AdminController'
import {roleController} from './controller/RoleController'
import {loginController} from './controller/LoginController'
import {roomTypeController} from './controller/RoomTypeController'
export let responseDispatch = function(url,params) {
    switch (url) {
        case req_con.LOGINGET:
            console.log(url);
            console.log(params);
            console.log(loginController(url,params));
            return loginController(url,params)
        case req_con.LAYOUTGET:
            return loginController(url,params)
            
        //Role
        case req_con.ROLE_CONSTANT.ROLELISTGTE:
            return roleController(url,params)
        case req_con.ROLE_CONSTANT.ROLEADD:
            return roleController(url,params)
        case req_con.ROLE_CONSTANT.ROLEDELETE:
            return roleController(url,params)
        case req_con.ROLE_CONSTANT.ROLEUPDATE:
            return roleController(url,params)

        //Admin
        case req_con.ADMIN_CONSTANT.ADMINLISTGET:
            return adminController(url,params)
        case req_con.ADMIN_CONSTANT.ADMINADD:
            return adminController(url,params)
        case req_con.ADMIN_CONSTANT.ADMINDELETE:
            return adminController(url,params) 
        case req_con.ADMIN_CONSTANT.ADMINUPDATE:
            return adminController(url,params)

        //RoomType 
        case req_con.ROOMTYPE_CONSTANT.ROOMTYPELISTGET:
            return  roomTypeController(url,params)
        case req_con.ROOMTYPE_CONSTANT.ROOMTYPEADD:
            return  roomTypeController(url,params)
        case req_con.ROOMTYPE_CONSTANT.ROOMTYPEELETE:
            return  roomTypeController(url,params)
        case req_con.ROOMTYPE_CONSTANT.ROOMTYPEUPDATE:
            return  roomTypeController(url,params)
        default:
            break;
    }
}